package hcn.protocol.brandnew.dengji.zaiyuan;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 获取住院患者列表-请求消息 - ODS_02090005_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class InHospitalListpatientResponse {

    /**
     * 住院患者List
     */
    @XmlElementWrapper(name = "RequestLists")
    @XmlElement(name = "RequestList")
    private List<RequestList> requestLists;
    /**
     * 总条数,目前仅在dateType为空时返回
     */
    @XmlElement(name = "Total")
    private String total;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class NewbornList {

        /**
         * 新生儿唯一号
         */
        @XmlElement(name = "NewbornId")
        private String newbornId;
        /**
         * 新生儿姓名
         */
        @XmlElement(name = "NewbornName")
        private String newbornName;
        /**
         * 新生儿性别
         */
        @XmlElement(name = "NewbornSexCode")
        private String newbornSexCode;
        /**
         * 新生儿出生日期
         */
        @XmlElement(name = "NewbornBirth")
        private String newbornBirth;
        /**
         * 新生儿床号
         */
        @XmlElement(name = "NewbornBedNumber")
        private String newbornBedNumber;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class NewbornLists {

        /**
         * 新生儿
         */
        @XmlElement(name = "NewbornList")
        private NewbornList newbornList;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {

        /**
         * 住院号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 住院号码
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 年龄
         */
        @XmlElement(name = "Age")
        private String age;
        /**
         * 入院科室
         */
        @XmlElement(name = "VisitDeptId")
        private String visitDeptId;
        /**
         * 科室名称
         */
        @XmlElement(name = "VisitDeptName")
        private String visitDeptName;
        /**
         * 病床号
         */
        @XmlElement(name = "SickbedId")
        private String sickbedId;
        /**
         * 入院日期时间
         */
        @XmlElement(name = "AdmissionDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date admissionDateTime;
        /**
         * 诊断编码
         */
        @XmlElement(name = "DiagnoseCode")
        private String diagnoseCode;
        /**
         * 诊断名称
         */
        @XmlElement(name = "DiagnoseName")
        private String diagnoseName;
        /**
         * 住院医师
         */
        @XmlElement(name = "InHospitalDoctorId")
        private String inHospitalDoctorId;
        /**
         * 主治医师
         */
        @XmlElement(name = "ResponsibilityDoctorId")
        private String responsibilityDoctorId;
        /**
         * 主治医生名称
         */
        @XmlElement(name = "ResponsibilityDoctor")
        private String responsibilityDoctor;
        /**
         * 主任医师
         */
        @XmlElement(name = "DirectorDoctorId")
        private String directorDoctorId;
        /**
         * 病人性质
         */
        @XmlElement(name = "PatientProperties")
        private String patientProperties;
        /**
         * 责任护士
         */
        @XmlElement(name = "ResponsibilityNurseId")
        private String responsibilityNurseId;
        /**
         * 责任护士签名
         */
        @XmlElement(name = "ResponsibilityNurse")
        private String responsibilityNurse;
        /**
         * 是否危急
         */
        @XmlElement(name = "IsCrisis")
        private int isCrisis;
        /**
         * 是否欠费
         */
        @XmlElement(name = "IsArrears")
        private int isArrears;
        /**
         * 是否过敏
         */
        @XmlElement(name = "IsAllergy")
        private int isAllergy;
        /**
         * 过敏情况
         */
        @XmlElement(name = "AllergyCondition")
        private String allergyCondition;
        /**
         * 病区代码
         */
        @XmlElement(name = "WardAreaId")
        private String wardAreaId;
        /**
         * 病区名称
         */
        @XmlElement(name = "WardAreaName")
        private String wardAreaName;
        /**
         * 护理等级代码
         */
        @XmlElement(name = "NursingLevel")
        private String nursingLevel;
        /**
         * 体重（kg）
         */
        @XmlElement(name = "Weight")
        private String weight;
        /**
         * 饮食指导代码
         */
        @XmlElement(name = "DietTypeCode")
        private String dietTypeCode;
        /**
         * 住院状态
         */
        @XmlElement(name = "HospizationStatus")
        private Byte hospizationStatus;
        /**
         * 婚姻状况代码
         */
        @XmlElement(name = "MaritalStatus")
        private String maritalStatus;
        /**
         * 民族
         */
        @XmlElement(name = "Nationality")
        private String nationality;
        /**
         * 职业类别代码
         */
        @XmlElement(name = "OccupationCategoryCode")
        private String occupationCategoryCode;
        /**
         * 患者电话号码
         */
        @XmlElement(name = "ContactPersonTel")
        private String contactPersonTel;
        /**
         * 工作单位名称
         */
        @XmlElement(name = "WorkUnit")
        private String workUnit;
        /**
         * 籍贯
         */
        @XmlElement(name = "OriginCityName")
        private String originCityName;
        /**
         * 血型代码
         */
        @XmlElement(name = "ABOBloodCode")
        private String aBOBloodCode;
        /**
         * 体格检查-身高（cm）
         */
        @XmlElement(name = "Height")
        private String height;
        /**
         * 新生儿列表
         */
        @XmlElement(name = "NewbornLists")
        private NewbornLists newbornLists;

        /**
         * 欠费金额
         */
        @XmlElement(name = "ArrearsCost")
        private String arrearsCost;

        /**
         * 是否安排手术 0是 1否
         */
        @XmlElement(name = "IsOperation")
        private String isOperation;

        /**
         * 是否申请转科 0是 1否
         */
        @XmlElement(name = "IsTransferred")
        private String isTransferred;

        /**
         * 是否当日待出院 0是 1否
         */
        @XmlElement(name = "IsDischarge")
        private String isDischarge;

        /**
         * 质控提醒 0是 1否
         */
        @XmlElement(name = "IsQuality")
        private String isQuality;
    }

}
